<template>
  <el-menu background-color="#545c64" text-color="#fff" active-text-color="#ffd04b" :default-active="$route.fullPath" :collapse="collapse">
    <v-submenu @select="handleSelectSubmenu" :menu="menu"></v-submenu>
  </el-menu>
</template>
<script>
import VSubmenu from './submenu'
export default {
  name: 'v-menu',
  components: {
    VSubmenu
  },
  props: {
    menu: {
      type: Array,
      default() {
        return []
      }
    }
  },

  methods: {
    handleSelectSubmenu(key, keyPath) {
      console.log(key, keyPath)
    }
  }
}
</script>

<style lang="scss" scoped>
.router-link-exact-active {
  span,
  i {
    color: rgb(255, 208, 75);
  }
}
</style>
